def dict_to_sbar_args(d: dict, p_key: str = "") -> list[str]:
    args = []
    for k, v in d.items():
        key = f"{p_key}.{k}" if p_key else k
        if isinstance(v, dict):
            args += dict_to_sbar_args(v, key)
        elif isinstance(v, bool):
            args.append(f"{key}={str(v).lower()}")
        else:
            args.append(f"{key}={v}")

    return args
